package Hibernate.dao;

import java.util.Map;

/**
 * Exam entity. @author MyEclipse Persistence Tools
 */

public class Exam implements java.io.Serializable {

	// Fields

	private String examId;
	private String epname;
	private String epclassId;
	private String eptime;
	private String subject;
	private Integer eplast;
	private String userSubtype;
	private String epyear;
	private Integer expertCount;

	// Constructors

	/** default constructor */
	public Exam() {
	}

	/** full constructor */
	public Exam(String examId, String epname, String epclassId, String eptime,
			String subject, Integer eplast, String userSubtype, String epyear,
			Integer expertCount) {
		this.examId = examId;
		this.epname = epname;
		this.epclassId = epclassId;
		this.eptime = eptime;
		this.subject = subject;
		this.eplast = eplast;
		this.userSubtype = userSubtype;
		this.epyear = epyear;
		this.expertCount = expertCount;
	}

	// Property accessors

	public String getExamId() {
		return this.examId;
	}

	public void setExamId(String examId) {
		this.examId = examId;
	}

	public String getEpname() {
		return this.epname;
	}

	public void setEpname(String epname) {
		this.epname = epname;
	}

	public String getEpclassId() {
		return this.epclassId;
	}

	public void setEpclassId(String epclassId) {
		this.epclassId = epclassId;
	}

	public String getEptime() {
		return this.eptime;
	}

	public void setEptime(String eptime) {
		this.eptime = eptime;
	}

	public String getSubject() {
		return this.subject;
	}

	public void setSubject(String subject) {
		this.subject = subject;
	}

	public Integer getEplast() {
		return this.eplast;
	}

	public void setEplast(Integer eplast) {
		this.eplast = eplast;
	}

	public String getUserSubtype() {
		return this.userSubtype;
	}

	public void setUserSubtype(String userSubtype) {
		this.userSubtype = userSubtype;
	}

	public String getEpyear() {
		return this.epyear;
	}

	public void setEpyear(String epyear) {
		this.epyear = epyear;
	}

	public Integer getExpertCount() {
		return this.expertCount;
	}

	public void setExpertCount(Integer expertCount) {
		this.expertCount = expertCount;
	}
	
	public void setInfo(Map<String, String> value) {
		// TODO Auto-generated method stub
		if(value.containsKey("epname")){
			this.setEpname(value.get("epname"));
		}
		if(value.containsKey("eptime")){
			this.setEptime(value.get("eptime"));
		}
		if(value.containsKey("subject")){
			this.setSubject(value.get("subject"));
		}
		if(value.containsKey("eplast")){
			this.setEplast(Integer.parseInt(value.get("eplast")));
		}
		if(value.containsKey("epyear")){
			this.setEpyear(value.get("epyear"));
		}
		if(value.containsKey("userSubType")){
			this.setUserSubtype(value.get("userSubType"));
		}
		if(value.containsKey("expertCount")){
			this.setExpertCount(Integer.parseInt(value.get("expertCount")));
		}
	}

}